<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>学期时间</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="../../css/public.css" media="all" />
	<script src="../../layui/layui.all.js"></script>
	<script src="../../layui/lay/modules/laytpl.js"></script>
</head>
<body class="childrenBody">

	<script id="testTp3" type="text/html">
		<option value="xxx">请选择学校</option>
		{{# for(var i = 0; i < d.length; i++){ }}
		<option value='{{ d[i].id }}'>{{ d[i].name }}</option>
		{{# } }}
	</script>

	<script id="testTpl" type="text/html">

		<table class="layui-table" style="margin: 0 auto;" lay-skin="line">
			<colgroup>
				<col width="20%">
				<col width="20%">
				<col>
				<col width="20%">
			</colgroup>
			<thead>
			<tr>
				<th></th>
				<th>名称</th>
				<th>时间</th>
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
			{{# for(var i = 1; i <= d.length; i++){ }}
			<tr>
				<td>{{ i }}</td>
				<td>{{ d[i-1].semesterID }}</td>
				<td>
					<div class="layui-inline" style="width: 70%">
						<div class="layui-input-inline" style="width: 100%">
							<input type="text" class="layui-input test-item" id="t{{ i }}" placeholder=" - " value="{{ d[i-1].date }}">
						</div>
					</div>
				</td>
				<td>
					<button type="button" class="layui-btn del layui-btn-danger" data="{{ d[i-1].semesterID }}" >删除</button>
				</td>
			</tr>
			{{# } }}
			</tbody>
		</table>
	</script>
	<div class="layui-form" lay-filter="myDiv" style="width:150px;text-align:center;float: left">
		<select name="" id="test1" lay-filter="mySelect1">
			<option value="xxx">请选择学校</option>
			<!--<option>王先生</option>-->
		</select>
	</div>

	<div id="course" class="layui-col-md8"><!--yw 确定宽度-->
	</div>

	<div class="layui-col-md1" style="margin-left: 30px">
		<button type="button" id="add" class="layui-btn layui-btn-normal"><i class="layui-icon">&#xe608;</i>新增</button>
	</div>

	<div style="display:none;padding:10px" id="addDiv">
		<form action="" method="post" class="layui-form" id="dataFrm2" lay-filter="dataFrm2">
			<div class="layui-form-item">
				<label class="layui-form-label">学期名称</label>
				<div class="layui-input-block">
					<input type="text" id="add1"  autocomplete="off" class="layui-input" placeholder="请参照格式：2018-2019-2 或者 2018-1" lay-verify="addName" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">时间</label>
				<div class="layui-input-block">
					<input type="text" id="add2" class="layui-input test-item" placeholder=" - ">

<!--					<input type="text" id="add2"  autocomplete="off" class="layui-input" placeholder="请参照格式：2018.04.03 - 2018.10.01" lay-verify="addDate" >-->
				</div>
			</div>

			<div class="layui-form-item">
				<div class="layui-input-block" style="text-align: center;">
					<button type="button" class="layui-btn" lay-submit id="doSubmitSave" lay-filter="doSubmitSave"><i class="layui-icon">&#xe605;</i>确认</button>
					<button type="reset" id="add3" class="layui-btn" ><i class="layui-icon">&#xe669;</i>重置</button>
				</div>
			</div>
		</form>
	</div>


	<!--<script type="text/javascript" src="../../layui/layui.js"></script>-->
	<script type="text/javascript" src="termTimeList.js"></script>
</body>
</html>
